
package visit;

import java.util.ArrayList;

public class Main {

    public static void main(String[] args) {

        ArrayList<Visitable> visitables = new ArrayList<Visitable>();
        for (int i = 0; i < 100; i++) {

            if (Math.random() > 0.5) {
                visitables.add(new NewsList());
            } else {
                visitables.add(new NewsNotifaction());

            }
        }

        Visitor visitor = new Visitor();
        for (Visitable visitable : visitables) {
            visitable.accept(visitor);
        }
    }
}
